/**
 * @(#)RecordMapper.java               Oct 4, 2009 8:49:04 PM
 */
package com.radeonsys.litmus.data;

/**
 * Represents a record mapper which maps fields inside a {@link Record} into an object useful for testing
 *
 * @param <T>   a type-parameter representing the type of object that will be mapped by this record mapper
 * 
 * @author Ranganath Kini (ranganathkini at gmail dot com)
 * @version 1.0
 */
public interface RecordMapper<T> {
	
	/**
	 * Returns an object which is acquired by mapping the fields of the specified 
	 * record to an object.
	 * 
	 * @param record    a reference to the {@link Record} instance to be mapped
     *
	 * @return  a reference to an object which was mapped from the specified record
     *
     * @throws RecordMappingFailureException
     *          if there was a failure while mapping the specified record to an object
	 */
	T map(Record record);
    
}
